using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter10
{
	/// <summary>
	/// Example07: Uniform Solid Cylinder
	/// An uniform solid cylinder has a radius R mass M, 
	/// and length L. Calculate its moment of inertia about 
	/// its central axis (the z axis in Fig.10.11).
	/// I_z = 1/2 MR^2
	/// </summary>
	public class Example07
	{
		public Example07()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Mass m = new L.Mass();
			m.kg = 10.0;
			L.RigidBody cyl = new L.RigidBody(m);
			L.Length radius = new L.Length();
			radius.m = 5.0;
			L.Length h = new L.Length();
			h.m = 5.0;
			cyl.SetCylinder(radius,h);
			L.MomentOfInertia I = cyl.RigidBodyMomentOfInertia;
			result+=Convert.ToString(I.YY)+"\r\n";  
			result+=Convert.ToString(I.ZZ)+"\r\n";  
		}
	}
}
